<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<h1>Installation</h1>
<h2>System requirements</h2>

If you only want to use the <b>wallet</b> with the corresponding <b>balio</b> tool,
you can run it on anything that your <b>go</b> compiler can build for.<br>
For instance, it will work on even the oldest Raspberry Pi model A with 256MB of RAM.
<br><br>

However, in order to run the full node (<b>client</b>), you need a 64-bit OS with a decent amount of RAM.<br>
See the <a href="https://github.com/piotrnar/gocoin/blob/master/README.md#hardware" target="_blank">README.md</a> file
for the current RAM requirement.<br>
<br>
You also need a file system that supports large files (bigger than 4GB) and a decent size of a free space on it.<br>
<br>
Note that you can purge blocks from disk, allowing you to run the node with a limited storage (e.g. 20GB).<br>
See <a href="gocoin_manual_config.html">config file</a> values:
<span class="cfg_name">Memory.MaxDataFileMB</span> and <span class="cfg_name">Memory.DataFilesKeep</span> (set this one to non-zero, e.g. 10)<br>
<br>
The node runs very well on Linux based virtual servers, as long as they have enough RAM.<br>
<!--
Find below a list of example providers. Most of them you can rent per-hour (estimated monthly cost in brackets).<br>
<a target="_blank" href="https://www.scaleway.com/">Scaleway</a>
&bull;
<a target="_blank" href="https://upcloud.com/">UpCloud</a> ($80)
&bull;
<a target="_blank" href="https://www.vultr.com/">Vultr</a> ($80)
&bull;
<a target="_blank" href="https://www.digitalocean.com/">DigitalOcean</a> ($80)
&bull;
<a target="_blank" href="https://linode.com/">linode</a> ($80)
&bull;
<a target="_blank" href="https://aws.amazon.com/">Amazon AWS</a> ($100)
&bull;
<a target="_blank" href="https://cloud.google.com/">Google Cloud</a> ($100)
<br>
<i>Mind that some of the prices above may not include VAT.</i><br>
<br>
-->
To quickly assess a performance of a chosen platform, you can use the benchmark below (lower time = better performance).<br>
<pre>

	package main

	import (
		"fmt"
		"math/rand"
		"time"
	)

	const (
		MAPSIZE = 8
		RECNT   = int(20e6)
	)

	func main() {
		tm := make(map[[MAPSIZE]byte]bool, RECNT)
		var k [MAPSIZE]byte
		fmt.Println("Plase wait...")
		sta := time.Now()
		for i := 0; i < RECNT; i++ {
			rand.Read(k[:])
			tm[k] = true
		}
		fmt.Printf("All %d records loaded in %s\n", RECNT, time.Now().Sub(sta).String())
	}

</pre>
<br>
<h2>Build from source</h2>

You will need <b>git</b> and <b>go</b> commands installed in your system.<br>
<br>
Download the source code from github to a local folder of your choice, e.g. by executing:
<code>git clone https://github.com/piotrnar/gocoin.git</code>
<br>
Then go to <code>gocoin/client/</code> and execute <code>go build</code> there.
Do the same in <code>gocoin/wallet/</code>, to build the wallet. <br>
In order to build <code>balio</code> or some other tool, go to <code>gocoin/tools/</code> and do <code>go build balio.go</code><br>
<br>

The process is also described in the main <b>README.md</b> file of the github repo
<a target="_blank" href="https://github.com/piotrnar/gocoin">piotrnar/gocoin</a><br>
<br>

<h2>Binaries</h2>
The binaries (usually not the latest version) for Windows and Linux can be downloaded from
<a target="_blank" href="https://sourceforge.net/projects/gocoin/files/?source=directory">sourceforge.net</a>
</body>
</html>